﻿using Acr.UserDialogs;
using LinnerToolkit.Core.Services;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Navigation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using Xamarin.Essentials;

namespace TangReadyV1.ViewModels
{
    public class MainPageViewModel : ViewModelBase
    {
        public MainPageViewModel(INavigationService navigationService, INotifyService _notifyService, IUserDialogs userDialogs)
            : base(navigationService)
        {
            Title = "Main Page";
            UserDialogs = userDialogs;
          //  VCodeLoginCommand = new DelegateCommand(VCodeLoginAsync);
        }

        private async void VCodeLoginAsync()
        {
            //throw new NotImplementedException();
            // UserDialogs.ShowLoading("登录中");

         //  ServiceReferenceNS. Service1Client client1 =  new ServiceReferenceNS.Service1Client(ServiceReferenceNS.Service1Client.EndpointConfiguration.BasicHttpBinding_IService1, "http://192.168.0.51:60814/Service1.svc");
         //   ServiceReferenceNS.AppDeviceInfo cur = new ServiceReferenceNS.AppDeviceInfo();
         //   cur.ShopName = "1";
         //   cur.MarketName = "2";
         //   cur.CashNo = "3";
         //   cur.DeviceUUID = "489999";
         //   cur.SpCode = "abc";
         //   cur.RegDate = DateTime.Now;
         //   cur.RunLast_DateTime = DateTime.Now;
         //   cur.ExpiredDate = DateTime.Now;


         ////   await    client1.AddAsync(cur);
         //   client1.Add(cur);






           // PhoneDialer.Open("13611776059");
        }

        public ICommand VCodeLoginCommand { get; }
        public IUserDialogs UserDialogs { get; }
    }
}
